package com.xzy.properties;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 属性映射
 *
 * @author xzy.xiao
 * @date 2022/4/6  10:12
 */
@Component
public class FieldMapper {
    @Value("${db.url}")
    private String url;
    @Value("${db.user}")
    private String user;
    @Value("${db.password}")
    private String password;
    @Value("${db.autoReconnect}")
    private Boolean autoReconnect;
    @Value("${db.useUnicode}")
    private Boolean useUnicode;
    @Value("${db.characterEncoding}")
    private String characterEncoding;
    @Value("${db.zeroDateTimeBehavior}")
    private String zeroDateTimeBehavior;
    @Value("${db.allowMultiQueries}")
    private Boolean allowMultiQueries;


    @Override
    public String toString() {
        return "FieldMapper{" +
                "url='" + url + '\'' +
                ", user='" + user + '\'' +
                ", password='" + password + '\'' +
                ", autoReconnect=" + autoReconnect +
                ", useUnicode=" + useUnicode +
                ", characterEncoding='" + characterEncoding + '\'' +
                ", zeroDateTimeBehavior='" + zeroDateTimeBehavior + '\'' +
                ", allowMultiQueries=" + allowMultiQueries +
                '}';
    }
}
